<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title>title</title>
		<link rel="stylesheet" type="text/css" href="../css/api.css"/>
		<link rel="stylesheet" type="text/css" href="../css/aui.css"/>
		<style>
			body, html {
				height: 100%;
			}
			.register_bg {
				width: 100%;
				height: 100%;
				background: url("../image/images/bg.png") no-repeat;
				background-size: 100%;
				-webkit-background-size: 100%;
				background-position: 0 0;
				position: fixed;
				top: 0;
				left: 0;
			}
			.Wrap {
				width: 100%;
				min-height: 100%;
				text-align: center;
				opacity: 0.9;
				position: absolute;
				top: 0;
				left: 0;
			}
			.register_content {
				width: 100%;
				min-height: 100%;
				text-align: center;
			}
			#logo {
				margin: 9% 35%;
			}
			p span {
				color: #FB6E62;
			}
			#password {
				width: 100%;
				background: #fff;
				padding: 3% 13%;
				padding-left: 2.75 rem;
				border-radius: 10px;
				-webkit-box-sizing: border-box;
				-moz-box-sizing: border-box;
				box-sizing: border-box;
				margin-bottom: 1rem;
			}
			#repassword {
				width: 100%;
				background: #fff;
				padding: 3% 13%;
				padding-left: 2.75 rem;
				border-radius: 10px;
				-webkit-box-sizing: border-box;
				-moz-box-sizing: border-box;
				box-sizing: border-box;
				margin-bottom: 1rem;
			}
			#username {
				width: 100%;
				background: #fff;
				padding: 3% 13%;
				padding-left: 2.75 rem;
				border-radius: 10px;
				-webkit-box-sizing: border-box;
				-moz-box-sizing: border-box;
				box-sizing: border-box;
				margin-bottom: 1rem;
			}
			input[type = radio] {
				-webkit-appearance: none;
				-moz-appearance: none;
				appearance: none;
				width: 20px;
				height: 20px;
				background: #fff;
				border-radius: 4px;
				border: 0.05 rem solid #D4D4D4;
				margin: -5px 2px;
			}
			input[type = radio]:checked {
				border: 1px solid #3895DB;
				background: url("../image/images/button.png") no-repeat center /contain;
			}
		</style>
	</head>
	<body>
		<div class="register_bg"></div>
		<div class="Wrap">
			<form action="" style="padding: 12% 10%;">
				<input id="password" type="password" placeholder="请输入新密码" pattern="[A-Za-z0-9]{6,13}" required/>
				<input id="repassword" type="password" placeholder="请确认新密码" pattern="[A-Za-z0-9]{6,13}" required/>
			</form>
			<div class="aui-content aui-content-padded">
				<div class="aui-btn aui-btn-info aui-btn-block" tapmode onclick="register('')">
					立即找回
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="../script/api.js"></script>
	<script type="text/javascript" src="../script/ajax/common.js"></script>
	<script type="text/javascript">
		var phoneNo;
		apiready = function() {
			phoneNo = api.pageParam.phoneNo;
		};
		function register() {
			//var username = document.getElementById('username').value;
			var password = document.getElementById('password').value;
			var repassword = document.getElementById('repassword').value;
			api.ajax({
				url : base_url + 'open/forget',
				method : 'get',
				data : {
					values : {
						userName : phoneNo,
						pwd : password,
						pwdr : repassword,
						phoneNo : phoneNo
					}
				}
			}, function(ret, err) {
				if (ret.code == 0) {
					$api.setStorage("username", phoneNo);
					$api.setStorage("password", password);
					api.openWin({
						name : 'successregF',
						url : 'successregF_win.html?ver=' + Math.random(),
						bounces : false,
						slidBackEnabled : false,
						vScrollBarEnabled : false
					});
				} else {
					api.toast({
						msg : ret.msg
					});
				}
			});
		}

		function arxAgreement() {
			api.openWin({
				name : 'arxAgreement_win',
				url : 'arxAgreement_win.html?ver=' + Math.random()
			})
		}
	</script>
</html>